package com.bawei.service;

import com.bawei.entity.User;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    //根据Id，查询user
    public User getUserById(Integer id){
        User user = new User();
        user.setId(id);
        user.setUsername("userName:"+id);
        return  user;
    }

    //根据Id，查询用户名称
    public String getUsernameById(Integer id){
        User user = getUserById(id);
        return user.getUsername();
    }
}
